package org.liaohailong.library.image

import org.liaohailong.library.image.glide.GlideImageEngine
import org.liaohailong.library.image.picasso.PicassoImageEngine

/**
 * Author: liaohailong
 * Date: 2019/3/7
 * Time: 9:34 PM
 * Description: 网络图片引擎库工厂类
 **/
object ImageEngineFactory {

    fun create(type: Type): ImageEngine {
        return when (type) {
            ImageEngineFactory.Type.Glide -> GlideImageEngine()
            ImageEngineFactory.Type.Picasso -> PicassoImageEngine()
        }
    }

    enum class Type {
        Glide,
        Picasso
    }
}